import httpInter from '@/commen/http_api/http_interceptor.js'

let bannerData = '/index/bannerLst'; //banner
let bigShotShare = '/index/articleFirst';//大咖分享
let tabs = '/index/articleCate';//分享tabs
let shareList = '/index/articleLst';//分享列表
let shareDetail = '/index/articleDetail';//分享详情
let activityList = '/index/activityLst';//活动列表
let activityDetail = '/index/activityDetail';//活动详情
let cityArea = '/index/cityArea';//市级数据获取
let getCurrentCity = '/index/getCurrentCity';//根据经纬度获取当前城市
let signUp = '/index/signUp';//立即报名
let activityData = '/index/activityData';//填写试打数据
let checkActivity = '/index/checkActivity';//查看试打数据
let storeDetail = '/index/storeDetail';//门店详情
let productLst = '/index/productLst';//产品列表
let productCate = '/index/productCate';//产品分类
let productDetail = '/index/productDetail';//商品详情
let createCart = '/index/createCart';//加入购物车
let evaluateLst = '/index/evaluateLst';//查看更多评论（产品）
let checkStoreOrder = '/index/checkStoreOrder';//确认订单
let cartLst = '/index/cartLst';//购物车
let changeCart = '/index/changeCart';//购物车（增减）
let delCart = '/index/delCart';//删除购物车商品
let nearByMerchant = '/index/nearByMerchant'; //附近门店
let createStoreOrder = '/index/createStoreOrder';//提交订单
let confirmOrder = '/user/confirmOrder';//确认收货
let evaluatePage = '/user/evaluatePage';//获取评价数据
let evaluateOrder = '/user/evaluateOrder';//立即评价
let secondCate = '/index/secondCate';//商品分类

let userInfos = '/user/userInfo';//用户信息
let clubCertification = '/user/clubCertification';//球杆认证
let shopList = '/index/store';//门店列表
let Myactivity = '/index/userActivityLst';//我的活动
let saveUserAdd = '/index/saveUserAdd';//添加/修改收货地址
let userAddress = '/index/userAddress';//用户地址
let getAddress = '/index/getAddress';//获取用户编辑地址信息
let setDefaultAdd = '/index/setDefaultAdd';//设置默认地址
let delAddress = '/index/delAddress';//删除地址
let assistantGroup = '/user/assistantGroup';//助力团
let integralBill = '/user/integralBill'; //积分明细
let storeOrderDetail = '/user/storeOrderDetail';//产品订单详情
let cancelOrder = '/user/cancelOrder';//产品取消订单
let getAllCity = 'index/getAllCity';//获取省市区
let getStock = 'index/getStock';//获取对应门店下规格库存

// 产品订单
let storeOrderLst = '/user/storeOrderLst';//产品订单列表
let unbind = '/index/unbind';//解绑店铺




/* 登陆接口 */
let userInfo = '/index/getCodeTransferOpenid'; //登陆
let getPhoneNumber = '/index/getPhoneNumber';//获取电话号码
let getAgreement = '/index/getAgreement';//获取用户协议

// 积分商城
let hallIndex = '/index/hallLst' // 积分商城主页
let hallType = '/index/moreHall' // 积分商城分类
let hallAllType = '/index/hallCategory' // 积分商城所有分类
let hallProductDetail = '/index/hallDetail' // 积分商城商品详情
let hallOrder = '/index/checkHallOrder' // 积分商品生成订单
let hallCreateOrder = '/index/createHallOrder' // 积分商品提交订单
let hallOrderList = '/user/hallOrderLst' // 积分商品订单列表 
let hallOrderDetail = '/user/hallOrderDetail' // 积分商品订单详情
let applyService = '/user/applyService' // 积分订单申请退款
let hoConfirmOrder = '/user/confirmOrder' // 积分订单确认收货
let evaluateHallPage = '/user/evaluateHallPage' // 获取评价页面信息
let evaluateHall = '/user/evaluateHall' // 积分订单评价
let token = 'user/getToken' // 获取用户token
let bindUp = 'user/bindUp' // 绑定上下级
let evaluateHallLst = 'index/evaluateHallLst' // 积分商品评论列表
let setInvoic = '/user/applyInvoice' // 开票
let invoiceDetail = '/user/invoiceDetail' // 获取开票信息
let payNow = '/user/payNow' // 获取支付参数
let getUserInfo = '/user/getUserInfo' // 获取用户基础信息
let changeUserInfo = '/user/changeUserInfo' // 编辑用户信息
let logoutUser = '/user/logoutUser' // 注销账号
const uploadUrl = `${httpInter.mybaseUrl}/index/uploadPictures` // 上传图片

let ballToolBrand = '/index/ballToolBrand' // 球具使用品牌
let configList = '/Index/configList' // 报名活动底部图片

function pageRouter(Vue, vm) {
	let bannerDataApi = (params = {}) => vm.$u.get(bannerData, params);
	let bigShotShareApi = (params = {}) => vm.$u.get(bigShotShare, params);
	let tabsApi = (params = {}) => vm.$u.get(tabs, params);
	let shareListApi = (params = {}) => vm.$u.get(shareList, params);
	let shareDetailApi = (params = {}) => vm.$u.get(shareDetail, params);	
	let activityListApi = (params = {}) => vm.$u.get(activityList, params);
	let cityAreaApi = (params = {}) => vm.$u.get(cityArea, params);
	let getCurrentCityApi = (params = {}) => vm.$u.get(getCurrentCity, params);
	let MyactivityApi = (params = {}) => vm.$u.get(Myactivity, params);
	let clubCertificationApi = (params = {}) => vm.$u.post(clubCertification, params);
	let shopListApi = (params = {}) => vm.$u.get(shopList, params);
	let saveUserAddApi = (params = {}) => vm.$u.post(saveUserAdd, params);
	let userInfosApi = (params = {}) => vm.$u.get(userInfos, params);
	let userInfoApi = (params = {}) => vm.$u.post(userInfo, params);
	let userAddressApi = (params = {}) => vm.$u.get(userAddress, params);
	let getAddressApi = (params = {}) => vm.$u.get(getAddress, params);
	let setDefaultAddApi = (params = {}) => vm.$u.get(setDefaultAdd, params);
	let delAddressApi = (params = {}) => vm.$u.get(delAddress, params);
	let activityDetailApi = (params = {}) => vm.$u.get(activityDetail, params);
	let signUpApi = (params = {}) => vm.$u.post(signUp, params);
	let activityDataApi = (params = {}) => vm.$u.post(activityData, params);
	let checkActivityApi = (params = {}) => vm.$u.get(checkActivity, params);
	let assistantGroupApi = (params = {}) => vm.$u.get(assistantGroup, params);
	let storeDetailApi = (params = {}) => vm.$u.get(storeDetail, params);
	let productLstApi = (params = {}) => vm.$u.get(productLst, params);
	let productCateApi = (params = {}) => vm.$u.get(productCate, params);
	let productDetailApi = (params = {}) => vm.$u.get(productDetail, params);
	let createCartApi = (params = {}) => vm.$u.post(createCart, params);
	let evaluateLstApi = (params = {}) => vm.$u.get(evaluateLst, params);
	let checkStoreOrderApi = (params = {}) => vm.$u.post(checkStoreOrder, params);
	let cartLstApi = (params = {}) => vm.$u.get(cartLst, params);
	let changeCartApi = (params = {}) => vm.$u.get(changeCart, params);
	let delCartApi = (params = {}) => vm.$u.get(delCart, params);
	let getHallIndex = (params = {}) => vm.$u.get(hallIndex, params);
	let getHallType = (params = {}) => vm.$u.get(hallType, params);
	let storeOrderLstApi = (params = {}) => vm.$u.get(storeOrderLst, params);
	let confirmOrderApi = (params = {}) => vm.$u.get(confirmOrder, params);
	let evaluatePageApi = (params = {}) => vm.$u.get(evaluatePage, params);
	let evaluateOrderApi = (params = {}) => vm.$u.post(evaluateOrder, params);
	let storeOrderDetailApi = (params = {}) => vm.$u.get(storeOrderDetail, params);
	let cancelOrderApi = (params = {}) => vm.$u.get(cancelOrder, params);
	let secondCateApi = (params = {}) => vm.$u.get(secondCate, params);
	let getAllCityApi = (params = {}) => vm.$u.get(getAllCity, params);
	let getHallAllType = (params = {}) => vm.$u.get(hallAllType, params);
	let getHallProductDetail = (params = {}) => vm.$u.get(hallProductDetail, params);
	let setHallOrder = (params = {}) => vm.$u.post(hallOrder, params);
	let setHallCreateOrder = (params = {}) => vm.$u.post(hallCreateOrder, params);
	let getHallOrderList = (params = {}) => vm.$u.get(hallOrderList, params);
	let getHallOrderDetail = (params = {}) => vm.$u.get(hallOrderDetail, params);
	let setApplyService = (params = {}) => vm.$u.post(applyService, params);
	let setHoConfirmOrder = (params = {}) => vm.$u.get(hoConfirmOrder, params);
	let getEvaluatePage = (params = {}) => vm.$u.get(evaluateHallPage, params);
	let setEvaluateHall = (params = {}) => vm.$u.post(evaluateHall, params);
	let setBindUp = (params = {}) => vm.$u.post(bindUp, params);
	let getToken = (params = {}) => vm.$u.post(token, params);
	let getEvaluateHallLst = (params = {}) => vm.$u.get(evaluateHallLst, params);

	let nearByMerchantApi = (params = {}) => vm.$u.get(nearByMerchant, params);
	let integralBillApi = (params = {}) => vm.$u.get(integralBill, params);
	let createStoreOrderApi = (params = {}) => vm.$u.post(createStoreOrder, params);
	let getPhoneNumberApi = (params = {}) => vm.$u.post(getPhoneNumber, params);
	let getStockApi = (params = {}) => vm.$u.get(getStock, params);
	let getAgreementApi = (params = {}) => vm.$u.get(getAgreement, params);
	let setInvoicApi = (params = {}) => vm.$u.post(setInvoic, params);
	let unbindApi = (params = {}) => vm.$u.get(unbind, params);
	let invoiceDetailApi = (params = {}) => vm.$u.get(invoiceDetail, params);
	let payNowApi = (params = {}) => vm.$u.get(payNow, params);
	let getUserInfoApi = (params = {}) => vm.$u.post(getUserInfo, params);
	let changeUserInfoApi = (params = {}) => vm.$u.post(changeUserInfo, params);
	let logoutUserApi = (params = {}) => vm.$u.post(logoutUser, params);
	let ballToolBrandApi = (params = {}) => vm.$u.post(ballToolBrand, params);
	let configListApi = (params = {}) => vm.$u.post(configList, params);

	return {
		bannerDataApi,bigShotShareApi,tabsApi,shareListApi,shareDetailApi,activityListApi,getCurrentCityApi,cityAreaApi,shopListApi,
		clubCertificationApi,MyactivityApi,userInfosApi,userInfoApi,saveUserAddApi,userAddressApi,getAddressApi,setDefaultAddApi,
		delAddressApi,activityDetailApi,signUpApi,activityDataApi,checkActivityApi,assistantGroupApi,storeDetailApi,productLstApi,
		productCateApi,productDetailApi,createCartApi,evaluateLstApi,checkStoreOrderApi,cartLstApi,changeCartApi,delCartApi,secondCateApi,
		getHallIndex, getHallType, getHallAllType, getHallProductDetail, setHallOrder, setHallCreateOrder, getHallOrderList, getHallOrderDetail, 
		setApplyService, setHoConfirmOrder, getEvaluatePage, setEvaluateHall, getToken, setBindUp, getEvaluateHallLst,storeOrderDetailApi,cancelOrderApi,
		storeOrderLstApi,confirmOrderApi,evaluatePageApi,evaluateOrderApi,createStoreOrderApi,getPhoneNumberApi, nearByMerchantApi, integralBillApi,
		getAllCityApi, getStockApi, getAgreementApi, setInvoicApi, unbindApi, invoiceDetailApi, payNowApi, getUserInfoApi,
		changeUserInfoApi, logoutUserApi, ballToolBrandApi, configListApi
	}
}
export default {
	pageRouter,
	uploadUrl,
}
